<?php
/**
 * The main template file.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage Twenty_Eleven
 */

get_header();
$slides_count = 6;
?>




<div id="bodycontent">
  
  <ul class="leftnav" style="left: 0px;">
    <?php query_posts('category_name=product&order=ASC'); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <li class="item">
      <a href="javascript:;">

       <?php the_title(); ?>
       <?php // kd_mfi_the_featured_image( 'thumbnail', 'post' ); ?>
      </a>
    </li>
    <?php endwhile; endif; ?>
    <?php wp_reset_query() ?>
</ul>

  <div class="slides">
    <div class="slide-container">
      <ul>
        <?php for($i=0; $i < $slides_count; $i++){ ?>
        <li <?= $i==0?'class="active item"':'class="item"' ?>>
          <img src="<?=get_template_directory_uri()?>/img/slide<?=$i+1?>.jpg" alt="">
        </li>
        <?php } ?>
      </ul>
    </div>
    <ul class="paginate">
      <?php for($i=0; $i < $slides_count; $i++){ ?>
      <li <?= $i==0?'class="active dot"':'class="dot"' ?>></li>
      <?php } ?>
    </ul>
  </div>

  <div class="features">
    <ul>
      <?php query_posts('category_name=feature&order=ASC'); ?>
      <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
      <li>
         <?php kd_mfi_the_featured_image( 'thumbnail', 'post' ); ?>
      </li>
      <?php endwhile; endif; ?>
      <?php wp_reset_query() ?>
    </ul>
  </div>
</div>
<script>
facade({
  mod:"cowboy"
});
</script>
<?php get_footer(); ?>